package DesignMode.SingletonPattern;

public class Singleton1 {
    private volatile static Singleton1 uniqueInstance;

    private Singleton1() {
    }

    public static Singleton1 getUniqueInstance() {
        if (uniqueInstance == null) {
            synchronized (Singleton1.class) {
                if (uniqueInstance == null) {
                    uniqueInstance = new Singleton1();
                }
            }
        }
        return uniqueInstance;
    }
}
